const app = getApp()

const { Api } = app.globalData

Page({
	data: {
		article: {}
	},

	onLoad({ id }){
		this.getArticle(id)
	},

	getArticle(id) {
		app.get(Api.article.item, {
			id
		}).then(res => {
			res.code === 1 && this.setData({
				article: res.data
			})
		})
	}
})